package com.shark.open.controller;

import com.shark.open.criteria.NozCriteria;
import com.shark.open.service.NozService;
import com.shark.open.service.StationService;
import com.shark.utils.Result;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/group")
public class GroupController {
    @Resource
    private StationService stationService;
    @Resource
    private NozService nozService;

    @PostMapping("/listStation")
    public Result listStation() {
        return Result.ok(stationService.listStation()).setLogResult(Boolean.FALSE);
    }

    @PostMapping("/listNoz")
    public Result listNoz(@RequestBody NozCriteria criteria) {
        return Result.ok(nozService.listNoz(criteria)).setLogResult(Boolean.FALSE);
    }

}
